<div class="common_form"    >

    <table cellpadding="0" >
        <tbody>

        <tr>
            <td>
                <?php $this->widget('ext.autowidget',array("type"=>"sykeyword","class"=>"syautokey"));?>
                <input type="text" class="syautokey" id='search'  />&nbsp;&nbsp;
                <select name="cardtype" id="cardtype"  style="float: none;vertical-align: middle;">
                    <option value="1">普通</option>
                    <option value="2">商务</option>
                </select>&nbsp;&nbsp;
                <input type="button" class="default_btn" id='submit'  value="搜索"/>
            </td>
        </tr>

        <tr>
            <td>
                <div id="speciallist"></div>

            </td>
        </tr>

        </tbody>
    </table>
</div>
<script type="text/javascript">
    $("#submit").bind("click",function(){
        var value=$.trim($("#search").val());
        var cardtype=$("select[name='cardtype'] option:selected").val();
        var str="";
        var result="";
        if(value.length==0) alert("请输入相关游戏名！");
        else{
            $.getJSON("/admin/ubutton/ubutton/getsygame?keyword="+value+"",function(data){
                for(var i=0;i<data.length;i++){

                    str+='<input type="checkbox" value="'+data[i]['title']+'" id="'+data[i]['id']+'" data-type="'+cardtype+'"> '+data[i]['title']+'<br/>';

                }
                if(parseInt(data)==0) $("#speciallist").html("<div style='width:200px;height:100px;line-height:100px;font-weight:bold;font-size:20px;color:#F00;margin:0 auto;'>没有找到相关游戏</div>");
                else $("#speciallist").html(str);

            });
        }
    });
</script>